package org.jiang.springbootdemo.demos.web.component;

import org.jiang.springbootdemo.demos.web.entity.ModelA;
import org.springframework.beans.factory.SmartFactoryBean;
import org.springframework.stereotype.Component;

@Component
public class SecondFactoryBean implements SmartFactoryBean<ModelA> {

    @Override
    public ModelA getObject() throws Exception {
        ModelA targetObject = new ModelA();
        targetObject.setSign("second factory create");
        return targetObject;
    }

    @Override
    public Class<?> getObjectType() {
        return ModelA.class;
    }

    @Override
    public boolean isEagerInit() {
        return true;
    }
}
